<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
  {{info}}
  <!--v-model双向绑定,变量会影响页面同时页面的改变也会影响变量
  双向绑定只作用在控件中
  -->
  <input type="text" v-model="info">
  <hr>
  用户名:<input type="text" v-model="user.username"
             placeholder="请输入用户名"><br>
  密码:<input type="password" v-model="user.password"
            placeholder="请输入密码"><br>
  <input type="button" value="登录">
</div>
<script src="js/vue.min.js"></script>
<script>
let v = new Vue({
  el:"body>div",
  data:{
    info:"双向绑定",
    user:{
      username:"",
      password:""
    }
  }
})
</script>
</body>
</html>